package com.such.kit.database.bean;

/**
 * @作者 SUCH
 * @日期 2017-9-12 下午1:50:55
 * @描述 DDL 表 key 对象
 */
public class DDLTableKey {

	private String schema;
	private String tableName;

	public DDLTableKey(String schema, String tableName) {
		this.schema = schema;
		this.tableName = tableName;
	}

	public String getSchema() {
		return this.schema;
	}

	public void setSchema(String schema) {
		this.schema = schema;
	}

	public String getTableName() {
		return this.tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((this.schema == null) ? 0 : this.schema.hashCode());
		result = prime * result + ((this.tableName == null) ? 0 : this.tableName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) return true;
		if (obj == null) return false;
		if (getClass() != obj.getClass()) return false;
		DDLTableKey other = (DDLTableKey) obj;
		if (this.schema == null) {
			if (other.schema != null) return false;
		} else if (!this.schema.equals(other.schema)) return false;
		if (this.tableName == null) {
			if (other.tableName != null) return false;
		} else if (!this.tableName.equals(other.tableName)) return false;
		return true;
	}

}
